{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>大学生就业管理系统-学生端</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: #f0f2f5;
            min-height: 100vh;
        }

        /* 导航栏样式 */
        .navbar {
            background: #1e3c72;
            padding: 15px 50px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            color: white;
            text-decoration: none;
        }

        .nav-buttons {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .btn {
            padding: 8px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .btn-login {
            background: transparent;
            border: 1px solid white;
            color: white;
        }

        .btn-login:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .btn-register {
            background: white;
            color: #1e3c72;
        }

        .btn-register:hover {
            background: #f8f9fa;
            transform: translateY(-1px);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 15px; /* 增加间距从10px到15px */
            cursor: pointer;
            position: relative;
        }

        .user-avatar {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1e3c72;
            font-weight: bold;
            font-size: 16px;
        }

        .user-name {
            color: white;
            font-size: 16px; /* 增加字体大小从14px到16px */
            margin-left: 5px; /* 添加左侧额外间距 */
            font-weight: 500; /* 添加适当的字重 */
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border-radius: 4px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin-top: 10px;
            min-width: 150px;
            display: none;
            z-index: 1000;
        }

        .user-profile:hover .dropdown-menu {
            display: block;
        }

        .dropdown-menu a {
            display: block;
            padding: 10px 15px;
            color: #333;
            text-decoration: none;
            transition: background 0.3s;
        }

        .dropdown-menu a:hover {
            background: #f8f9fa;
        }

        /* 主要内容区域 */
        .main-content {
            max-width: 1200px;
            margin: 40px auto;
            padding: 0 20px;
        }

        .search-section {
            text-align: center;
            margin-bottom: 40px;
            position: relative;
        }

        .search-input {
            width: 500px;
            padding: 12px 20px;
            border: 1px solid #ddd;
            border-radius: 25px;
            font-size: 16px;
            transition: all 0.3s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .search-input:focus {
            outline: none;
            border-color: #1e3c72;
            box-shadow: 0 2px 10px rgba(30, 60, 114, 0.1);
        }

        /* 美化后的特性卡片 */
        .features {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin-bottom: 50px;
        }

        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
            text-align: center;
            border: 1px solid rgba(0, 0, 0, 0.03);
        }

        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(30, 60, 114, 0.12);
        }

        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, #1e3c72, #2a5298);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.4s ease;
        }

        .feature-card:hover::before {
            transform: scaleX(1);
        }

        .feature-icon {
            font-size: 48px;
            color: #1e3c72;
            margin-bottom: 20px;
            background: rgba(30, 60, 114, 0.08);
            width: 90px;
            height: 90px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 25px;
            transition: all 0.4s ease;
        }

        .feature-card:hover .feature-icon {
            background: #1e3c72;
            color: white;
            transform: rotateY(180deg);
        }

        .feature-card h3 {
            color: #1e3c72;
            margin-bottom: 15px;
            font-size: 22px;
            font-weight: 600;
        }

        .feature-card p {
            color: #666;
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .feature-btn {
            display: inline-block;
            padding: 8px 20px;
            background: transparent;
            border: 1px solid #1e3c72;
            color: #1e3c72;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s;
            opacity: 0;
            transform: translateY(20px);
        }

        .feature-card:hover .feature-btn {
            opacity: 1;
            transform: translateY(0);
        }

        .feature-btn:hover {
            background: #1e3c72;
            color: white;
        }

        .job-list {
            background: white;
            padding: 25px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .job-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
            border-bottom: 1px solid #eee;
            transition: background 0.3s;
        }

        .job-item:hover {
            background: #f8f9fa;
        }

        .company-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .company-logo {
            width: 50px;
            height: 50px;
            border-radius: 5px;
            background: #f5f5f5;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #1e3c72;
        }

        @media (max-width: 768px) {
            .navbar {
                padding: 15px 20px;
            }

            .search-input {
                width: 100%;
            }

            .features {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
<nav class="navbar">
    <a href="{% url 'author:student_index' %}" class="logo">大学生就业管理系统-学生端</a>
    <div class="nav-buttons">
        {% if user.is_authenticated %}
            <div class="user-profile">
                <div class="user-avatar">
                    <img src="{% static 'image/xiaoqin.png' %}" alt="">
                    {{ user.username|first|upper }}
                </div>
                <span class="user-name">{{ user.username }}</span>
                <div class="dropdown-menu">
                    <a href="{% url 'author:logout' %}" style="color: #dc3545;"><i class="fas fa-sign-out-alt"></i> 退出登录</a>

                </div>
            </div>
        {% else %}
            <a href="{% url 'author:login' %}" class="btn btn-login">登录</a>
            <a href="{% url 'author:register' %}" class="btn btn-register">注册</a>
        {% endif %}
    </div>
</nav>


<div class="main-content">


    <div class="features">
        <a href="{% url 'job:base_information' %}" style="text-decoration: none; color: inherit;">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-file-alt"></i>
                </div>
                <h3>简历管理</h3>
                <p>创建和管理个人简历，展示你的专业技能和工作经验，提高求职竞争力</p>
                <span class="feature-btn">立即管理</span>
            </div>
        </a>

        <a href="{% url 'job_apply:job_apply_list' %}" style="text-decoration: none; color: inherit;">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-briefcase"></i>
                </div>
                <h3>职位申请</h3>
                <p>浏览和申请适合你的职位，跟踪申请进度，提高求职效率</p>
                <span class="feature-btn">开始申请</span>
            </div>
        </a>

        <a href="{% url 'job_apply:help' %}" style="text-decoration: none; color: inherit;">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-chalkboard-teacher"></i>
                </div>
                <h3>面试指导</h3>
                <p>提供面试技巧和经验分享，助你成功应对求职挑战，赢得理想职位</p>
                <span class="feature-btn">查看指导</span>
            </div>
        </a>

    </div>

    <div class="job-item">
        <div class="company-info">
            <div class="company-logo">
                <i class="fab fa-tencent-weibo"></i>
            </div>
            <div>
                <h4>前端开发工程师</h4>
                <p>腾讯科技 · 北京 · 15k-25k</p>
            </div>
        </div>
        {% if user.is_authenticated %}
            <a href="https://careers.tencent.com/jobdesc.html?postId=1892411157784862720" target="_blank"
               class="btn btn-register">立即申请</a>
        {% else %}
            <a href="{% url 'author:login' %}" class="btn btn-login">登录申请</a>
        {% endif %}
    </div>


</div>
</body>
</html>
